package cn.wolfcode.crm.query;

import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.util.StringUtils;

import java.util.Date;

@Data
public class CustomerReportQuery extends QueryObject {
    //解析为字符串
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date beginDate;
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date endDate;
    private String keyword;
    private String groupType = "e.name";

    public String getKeyword() {
        return StringUtils.hasLength(keyword) ? keyword.trim() : null;
    }
}
